/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.system;

import com.enation.app.javashop.client.system.MessageTemplateClient;
import com.enation.app.javashop.core.client.fallback.system.MessageTemplateClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.system.dos.MessageTemplateDO;
import com.enation.app.javashop.model.system.enums.MessageCodeEnum;
import com.enation.app.javashop.model.system.enums.WechatMsgTemplateTypeEnum;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @version v7.0
 * @Description: 消息模版client
 * @Author: zjp
 * @Date: 2018/7/27 09:42
 */
@FeignClient(value = "system-service",fallbackFactory = MessageTemplateClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface MessageTemplateClientFeignImpl extends MessageTemplateClient {
    /**
     * 获取消息模版
     * @param messageCodeEnum 消息模版编码
     * @return MessageTemplateDO  消息模版
     */
    @Override
    @RequestMapping(value = "/client/message-template",method = RequestMethod.GET)
    MessageTemplateDO getModel(@RequestParam("message_code_enum") MessageCodeEnum messageCodeEnum);

    @Override
    @RequestMapping(value = "/client/message/wechat/send",method = RequestMethod.POST)
    void sendWechatMsg(@RequestParam("member_id")Long memberId, @RequestParam("message_type")WechatMsgTemplateTypeEnum messageType, @RequestBody List<Object> keywords);


}
